import hashlib

from django.shortcuts import render

# Create your views here.


def hexdpwd(str):
    # 待加密信息
    str = 'zhang3'

    # 设置字符编码
    ustr = str.encode(encoding='utf-8')

    # 创建md5对象
    m = hashlib.md5(ustr)

    # 加密字符串
    str_md5 = m.hexdigest()

    return str_md5


def index(request):
    return render(request, 'nicead/index.html')


def dologin(request):
    return None


